import { useEffect, useState } from 'react'
import logo from './logo.svg'
import './App.css'
import { getToken,removeToken,setToken } from './utils/auth'
import {reqLogin} from './api/login'
import Router from './router'
import 'antd/dist/antd.css'
import { Provider } from 'react-redux'
import store from './store'

function App() {
  // console.log(removeToken())
  useEffect(()=>{
    reqLogin({username:'admin',password:'12346'})
      .then(data=>{
        // console.log(data)
        const {token} = data.data
        // console.log(token)
        setToken(token)
      })
  },[])

  return (
    <Provider store={store}>
    <Router>
      <div className="App">
        首页
      </div>
    </Router>
    </Provider>
    
  )
}

export default App
